/*
 * @(#) $Header$
 *
 * Copyright (C) 2007  Forklabs Daniel Léonard
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

package ca.forklabs.media.jai;

import java.awt.RenderingHints;
import javax.media.jai.CollectionImage;

/**
 * Interface {@code SpectralFilter3D} is used by operation
 * <em>spectralhomomorphicfilter</em> in <em>collection</em> mode.
 * <p>
 * The lifecycle of this interface is simple. First are called
 * {@link #setWidth(int)}, {@link #setHeight(int)} and {@link #setDepth(int)} to
 * set the bounds of the image. Then
 * {@link #getFilterImage(int, RenderingHints)} is called to get the filter
 * image.
 * <p>
 * The filter image must be complex (have an even number of band, twice that of
 * the desired number of elements) and centered.
 *
 * @author   <a href="mailto:forklabs at gmail.com?subject=ca.forklabs.media.jai.SpectralFilter3D">Daniel Léonard</a>
 * @version $Revision$
 */
public interface SpectralFilter3D {

   /**
    * Sets the width of the filter image.
    * @param   width   the desired width.
    */
   public void setWidth(int width);

   /**
    * Sets the height of the filter image.
    * @param   height   the desired height.
    */
   public void setHeight(int height);

   /**
    * Sets the depth of the filter image.
    * @param   depth   the desired depth.
    */
   public void setDepth(int depth);

   /**
    * Creates the complex filter image. The filter must be centered.
    * @param   elements   the desired number of elements.
    * @param   hints   inherited rendering hints.
    * @return   the filter image.
    */
   public CollectionImage getFilterImage(int elements, RenderingHints hints);

   }
